package com.wh;

public class MaoPao {
    public static void main(String[] args) {
        short s1 = 1;
        s1 = (short) (s1 + 1);
        int a[]=new int[]{12,5,23,6,2};
        for(int i=0;i<a.length-1;i++){
            for(int j=0;j<a.length-1-i;j++){
                if(a[j]>a[j+1]){
                    int t=a[j];
                    a[j]=a[j+1];
                    a[j+1]=t;
                }
            }
        }
        for(int i=0;i<a.length;i++){
            System.out.println(a[i]);
        }
    }
}
